x = 0;
for i in range(1,10001):
    if i%7==0:
        x+=i
print(x)
